package tw.edu.tku.im.maze;
import org.json.JSONException;
import org.json.JSONObject;


public class UpdateRoomReqParser extends PacketParser {
   public static UpdateRoomReqParser INSTANCE = new UpdateRoomReqParser();
   
   private UpdateRoomReqParser() { }

   @Override
   public UpdateRoomReq parse(JSONObject jsonObj) throws JSONException {
      JSONObject parameter = jsonObj.getJSONObject("parameter");      
      return new UpdateRoomReq(parameter.getInt("roomID"));
   }

   @Override
   public String acceptName() {
      return "updateRoom";
   }
}
